1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 3.2 Final//EN">
3 <!--Converted with LaTeX2HTML 2002 (1.67)
4 original version by: Nikos Drakos, CBLU, University of Leeds
5 * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
6 * with significant contributions from:
7 Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
10 <TITLE>Specification of the Go Text Protocol, version
2, draft
2</TITLE>
11 <META NAME=
"description" CONTENT=
"Specification of the Go Text Protocol, version 2, draft 2">
12 <META NAME=
"keywords" CONTENT=
"gtp2-spec">
13 <META NAME=
"resource-type" CONTENT=
"document">
14 <META NAME=
"distribution" CONTENT=
"global">
16 <META HTTP-EQUIV=
"Content-Type" CONTENT=
"text/html; charset=iso-8859-1">
17 <META NAME=
"Generator" CONTENT=
"LaTeX2HTML v2002">
18 <META HTTP-EQUIV=
"Content-Style-Type" CONTENT=
"text/css">
20 <LINK REL=
"STYLESHEET" HREF=
"gtp2-spec.css">
28 <H1 ALIGN=
"CENTER">Specification of the Go Text Protocol, version
2, draft
2</H1>
29 <P ALIGN=
"CENTER"><STRONG>Gunnar Farneb
äck
</STRONG></P>
30 <P ALIGN=
"CENTER"><STRONG>October,
2002</STRONG></P>
33 <TT>http://www.lysator.liu.se/~gunnar/gtp
</TT>
38 <B><FONT SIZE=
"+3">This is a draft only.
</FONT></B>
42 Permission is granted to make and distribute verbatim or modified
43 copies of this specification provided that the terms of the GNU Free
44 Documentation License (section
<A HREF=
"gtp2-spec.html#sec:gfdl">10</A>) are respected.
49 <H2><A NAME=
"SECTION00010000000000000000">
52 <!--Table of Contents-->
55 <LI><A NAME=
"tex2html75"
56 HREF=
"gtp2-spec.html#SECTION00020000000000000000">1 Introduction
</A>
58 <LI><A NAME=
"tex2html76"
59 HREF=
"gtp2-spec.html#SECTION00021000000000000000">1.1 Purpose of the Protocol
</A>
60 <LI><A NAME=
"tex2html77"
61 HREF=
"gtp2-spec.html#SECTION00022000000000000000">1.2 History
</A>
62 <LI><A NAME=
"tex2html78"
63 HREF=
"gtp2-spec.html#SECTION00023000000000000000">1.3 Communication Model
</A>
64 <LI><A NAME=
"tex2html79"
65 HREF=
"gtp2-spec.html#SECTION00024000000000000000">1.4 Typical Use Cases
</A>
66 <LI><A NAME=
"tex2html80"
67 HREF=
"gtp2-spec.html#SECTION00025000000000000000">1.5 Reference Implementation
</A>
70 <LI><A NAME=
"tex2html81"
71 HREF=
"gtp2-spec.html#SECTION00030000000000000000">2 Protocol Basics
</A>
73 <LI><A NAME=
"tex2html82"
74 HREF=
"gtp2-spec.html#SECTION00031000000000000000">2.1 Character Set
</A>
75 <LI><A NAME=
"tex2html83"
76 HREF=
"gtp2-spec.html#SECTION00032000000000000000">2.2 Control Characters
</A>
77 <LI><A NAME=
"tex2html84"
78 HREF=
"gtp2-spec.html#SECTION00033000000000000000">2.3 Whitespace
</A>
79 <LI><A NAME=
"tex2html85"
80 HREF=
"gtp2-spec.html#SECTION00034000000000000000">2.4 Newline Convention
</A>
81 <LI><A NAME=
"tex2html86"
82 HREF=
"gtp2-spec.html#SECTION00035000000000000000">2.5 Command Structure
</A>
83 <LI><A NAME=
"tex2html87"
84 HREF=
"gtp2-spec.html#SECTION00036000000000000000">2.6 Response Structure
</A>
85 <LI><A NAME=
"tex2html88"
86 HREF=
"gtp2-spec.html#SECTION00037000000000000000">2.7 Error Messages
</A>
87 <LI><A NAME=
"tex2html89"
88 HREF=
"gtp2-spec.html#SECTION00038000000000000000">2.8 Timing
</A>
89 <LI><A NAME=
"tex2html90"
90 HREF=
"gtp2-spec.html#SECTION00039000000000000000">2.9 Comments
</A>
91 <LI><A NAME=
"tex2html91"
92 HREF=
"gtp2-spec.html#SECTION000310000000000000000">2.10 Empty lines
</A>
93 <LI><A NAME=
"tex2html92"
94 HREF=
"gtp2-spec.html#SECTION000311000000000000000">2.11 Board Coordinates
</A>
95 <LI><A NAME=
"tex2html93"
96 HREF=
"gtp2-spec.html#SECTION000312000000000000000">2.12 Protocol Subsets
</A>
97 <LI><A NAME=
"tex2html94"
98 HREF=
"gtp2-spec.html#SECTION000313000000000000000">2.13 Private Extensions
</A>
99 <LI><A NAME=
"tex2html95"
100 HREF=
"gtp2-spec.html#SECTION000314000000000000000">2.14 Panic Situations
</A>
103 <LI><A NAME=
"tex2html96"
104 HREF=
"gtp2-spec.html#SECTION00040000000000000000">3 Protocol Details
</A>
106 <LI><A NAME=
"tex2html97"
107 HREF=
"gtp2-spec.html#SECTION00041000000000000000">3.1 Preprocessing
</A>
108 <LI><A NAME=
"tex2html98"
109 HREF=
"gtp2-spec.html#SECTION00042000000000000000">3.2 Syntactic Entities
</A>
110 <LI><A NAME=
"tex2html99"
111 HREF=
"gtp2-spec.html#SECTION00043000000000000000">3.3 Commands
</A>
112 <LI><A NAME=
"tex2html100"
113 HREF=
"gtp2-spec.html#SECTION00044000000000000000">3.4 Success Responses
</A>
114 <LI><A NAME=
"tex2html101"
115 HREF=
"gtp2-spec.html#SECTION00045000000000000000">3.5 Failure Responses
</A>
116 <LI><A NAME=
"tex2html102"
117 HREF=
"gtp2-spec.html#SECTION00046000000000000000">3.6 Standard Error Messages
</A>
120 <LI><A NAME=
"tex2html103"
121 HREF=
"gtp2-spec.html#SECTION00050000000000000000">4 Important Concepts
</A>
123 <LI><A NAME=
"tex2html104"
124 HREF=
"gtp2-spec.html#SECTION00051000000000000000">4.1 Handicap Placement
</A>
125 <LI><A NAME=
"tex2html105"
126 HREF=
"gtp2-spec.html#SECTION00052000000000000000">4.2 Time Handling
</A>
127 <LI><A NAME=
"tex2html106"
128 HREF=
"gtp2-spec.html#SECTION00053000000000000000">4.3 Scoring
</A>
131 <LI><A NAME=
"tex2html107"
132 HREF=
"gtp2-spec.html#SECTION00060000000000000000">5 Internal State
</A>
134 <LI><A NAME=
"tex2html108"
135 HREF=
"gtp2-spec.html#SECTION00061000000000000000">5.1 State Variables
</A>
136 <LI><A NAME=
"tex2html109"
137 HREF=
"gtp2-spec.html#SECTION00062000000000000000">5.2 Default State
</A>
138 <LI><A NAME=
"tex2html110"
139 HREF=
"gtp2-spec.html#SECTION00063000000000000000">5.3 State Maintenance
</A>
142 <LI><A NAME=
"tex2html111"
143 HREF=
"gtp2-spec.html#SECTION00070000000000000000">6 Commands
</A>
145 <LI><A NAME=
"tex2html112"
146 HREF=
"gtp2-spec.html#SECTION00071000000000000000">6.1 Required Commands
</A>
147 <LI><A NAME=
"tex2html113"
148 HREF=
"gtp2-spec.html#SECTION00072000000000000000">6.2 Protocol Subsets
</A>
149 <LI><A NAME=
"tex2html114"
150 HREF=
"gtp2-spec.html#SECTION00073000000000000000">6.3 List of All Commands
</A>
153 <LI><A NAME=
"tex2html115"
154 HREF=
"gtp2-spec.html#SECTION00080000000000000000">7 Example
</A>
155 <LI><A NAME=
"tex2html116"
156 HREF=
"gtp2-spec.html#SECTION00090000000000000000">8 Comments on the Specification
</A>
158 <LI><A NAME=
"tex2html117"
159 HREF=
"gtp2-spec.html#SECTION00091000000000000000">8.1 Design Principles
</A>
160 <LI><A NAME=
"tex2html118"
161 HREF=
"gtp2-spec.html#SECTION00092000000000000000">8.2 Detail Comments
</A>
162 <LI><A NAME=
"tex2html119"
163 HREF=
"gtp2-spec.html#SECTION00093000000000000000">8.3 Missing Features
</A>
164 <LI><A NAME=
"tex2html120"
165 HREF=
"gtp2-spec.html#SECTION00094000000000000000">8.4 Licensing
</A>
168 <LI><A NAME=
"tex2html121"
169 HREF=
"gtp2-spec.html#SECTION000100000000000000000">9 Credits
</A>
170 <LI><A NAME=
"tex2html122"
171 HREF=
"gtp2-spec.html#SECTION000110000000000000000">10 GNU Free Documentation License
</A>
173 <LI><A NAME=
"tex2html123"
174 HREF=
"gtp2-spec.html#SECTION000112000000000000000">10.1 Applicability and Definitions
</A>
175 <LI><A NAME=
"tex2html124"
176 HREF=
"gtp2-spec.html#SECTION000113000000000000000">10.2 Verbatim Copying
</A>
177 <LI><A NAME=
"tex2html125"
178 HREF=
"gtp2-spec.html#SECTION000114000000000000000">10.3 Copying in Quantity
</A>
179 <LI><A NAME=
"tex2html126"
180 HREF=
"gtp2-spec.html#SECTION000115000000000000000">10.4 Modifications
</A>
181 <LI><A NAME=
"tex2html127"
182 HREF=
"gtp2-spec.html#SECTION000116000000000000000">10.5 Combining Documents
</A>
183 <LI><A NAME=
"tex2html128"
184 HREF=
"gtp2-spec.html#SECTION000117000000000000000">10.6 Collections of Documents
</A>
185 <LI><A NAME=
"tex2html129"
186 HREF=
"gtp2-spec.html#SECTION000118000000000000000">10.7 Aggregation With Independent Works
</A>
187 <LI><A NAME=
"tex2html130"
188 HREF=
"gtp2-spec.html#SECTION000119000000000000000">10.8 Translation
</A>
189 <LI><A NAME=
"tex2html131"
190 HREF=
"gtp2-spec.html#SECTION0001110000000000000000">10.9 Termination
</A>
191 <LI><A NAME=
"tex2html132"
192 HREF=
"gtp2-spec.html#SECTION0001111000000000000000">10.10 Future Revisions of This License
</A>
194 <!--End of Table of Contents-->
197 <H1><A NAME=
"SECTION00020000000000000000">
200 This document gives a specification of the Go Text Protocol (GTP),
205 <H2><A NAME=
"SECTION00021000000000000000">
206 1.1 Purpose of the Protocol
</A>
210 The intention of GTP is to provide a flexible and easy to implement
211 communication protocol for go programs. The main purpose is to allow
212 two programs to play each other but it is also useful for regression
213 testing and communication with a GUI or a go server. Most use cases
214 require an external support program, but this can be shared between
215 all programs with GTP support.
219 <H2><A NAME=
"SECTION00022000000000000000">
222 The Go Text Protocol was developed within the GNU Go project,
223 initially to create a framework for automated regression testing and
224 to simplify connecting the program to go servers. The first appearance
225 of the protocol was on May
18,
2000, in GNU Go development version
226 2.7.95. The first stable release of GNU Go with GTP support was GNU Go
227 3.0.0, released August
24,
2001, which is the reference implementation
228 for version
1 of the protocol. There is no good specification of GTP
229 version
1, however, and this document is intended to provide one for
234 <H2><A NAME=
"SECTION00023000000000000000"></A>
235 <A NAME=
"sec:communication-model"></A>
237 1.3 Communication Model
239 The protocol is asymmetric and involves two parties, which we call
240 controller and engine. The controller is typically some kind of
241 arbiter or relay and the engine is typically a go playing program. All
242 communication is initiated by the controller in form of commands, to
243 which the engine responds.
246 The communication channel is assumed to be free from errors (i.e.
247 those are handled at a lower level). Examples are UNIX pipes or TCP/IP
248 connections. The latter can also be established over an error prone
249 modem connection by using PPP (Point to Point Protocol) as a transport
254 <H2><A NAME=
"SECTION00024000000000000000">
255 1.4 Typical Use Cases
</A>
259 <LI>Regression testing.
261 controller (regression script) -- engine
263 The controller sets up a board position and asks the engine to e.g.
268 <LI>Human vs program.
270 controller (GUI) -- engine
272 The controller relays moves between the human and the engine and
273 asks the engine to generate moves.
277 <LI>Program vs program with arbiter.
279 engine
1 -- controller (arbiter) -- engine
2
281 The controller relays moves between the two engines and alternately
282 asks the engines to generate moves. This involves two different GTP
283 channels, the first between the controller and engine
1, and the
284 second between the controller and engine
2. There is no direct
285 communication between the two engines. The controller dictates board
290 <LI>Program vs program without arbiter.
292 The same as above except that engine
1 includes the controller
293 functionality and the first GTP link is shortcut.
297 <LI>Connection between go server and program.
299 go server -- controller (relay) -- engine
301 The controller talks to a go server using whatever protocol is
302 needed and listens for match requests. When one arrives it accepts
303 it, starts the go engine and issues GTP commands to set up board
304 size, komi, etc. and if a game is restarted it also sets up the
305 position. Then it relays moves between the server and the engine and
306 asks the engine to generate new moves when it is in turn.
312 <H2><A NAME=
"SECTION00025000000000000000">
313 1.5 Reference Implementation
</A>
315 The reference implementation for GTP version
2 is GNU Go version
3.4.
316 In cases of incompleteness or unclarity in this specification, the
317 reference implementation decides the correct behaviour. Notice,
318 however, that any command available in GNU Go
3.4, but not included in
319 this specification (full list in section
<A HREF=
"gtp2-spec.html#sec:commands">6</A>), is to be
320 considered a private extension (see section
321 <A HREF=
"gtp2-spec.html#sec:private-extensions">2.13</A>).
324 Temporary comment: GNU Go
3.4 is currently under development and GTP
325 version
2 has not yet been implemented in the development versions.
329 <H1><A NAME=
"SECTION00030000000000000000">
330 2 Protocol Basics
</A>
335 <H2><A NAME=
"SECTION00031000000000000000"></A>
336 <A NAME=
"sec:character-set"></A>
340 All messages exchanged in this protocol are to be considered as
8-bit
341 character sequences. Only characters in the US-ASCII character set
342 (ANSI X3.4-
1986) are used for standardized commands and responses.
343 Other characters may be used in comments (section
<A HREF=
"gtp2-spec.html#sec:comments">2.9</A>)
344 and private extensions (section
<A HREF=
"gtp2-spec.html#sec:private-extensions">2.13</A>) but
345 there is no preferred character set specified for those.
349 <H2><A NAME=
"SECTION00032000000000000000">
350 2.2 Control Characters
</A>
352 Character values
0-
31 and
127 are control characters in ASCII. The
353 following control characters have a specific meaning in the
357 <TABLE CELLPADDING=
3>
358 <TR><TD ALIGN=
"LEFT"><TT>HT
</TT> (dec
9)
</TD>
359 <TD ALIGN=
"LEFT">Horizontal Tab
</TD>
361 <TR><TD ALIGN=
"LEFT"><TT>CR
</TT> (dec
13)
</TD>
362 <TD ALIGN=
"LEFT">Carriage Return
</TD>
364 <TR><TD ALIGN=
"LEFT"><TT>LF
</TT> (dec
10)
</TD>
365 <TD ALIGN=
"LEFT">Line Feed
</TD>
370 All other control characters must be discarded on input and should not
375 <H2><A NAME=
"SECTION00033000000000000000"></A>
376 <A NAME=
"sec:whitespace"></A>
380 The following ASCII characters can be used to indicate whitespace in
384 <TABLE CELLPADDING=
3>
385 <TR><TD ALIGN=
"LEFT"><TT>SPACE
</TT> (dec
32)
</TD>
386 <TD ALIGN=
"LEFT">Space
</TD>
388 <TR><TD ALIGN=
"LEFT"><TT>HT
</TT> (dec
9)
</TD>
389 <TD ALIGN=
"LEFT">Horizontal Tab
</TD>
394 In the rest of the specification we use 'space' to denote a whitespace
395 character. On input this may be either a SPACE or a HT. On output only a
396 SPACE should be used.
400 <H2><A NAME=
"SECTION00034000000000000000"></A>
401 <A NAME=
"sec:newline-convention"></A>
403 2.4 Newline Convention
405 A newline is indicated by a single LF character. Any occurence of a CR
406 character must be discarded on input, both by the engine and the
407 controller. On output either LF or some combination of CR and LF can
408 be used. In syntax descriptions we use
<code>\n
</code> to indicate a newline.
412 <H2><A NAME=
"SECTION00035000000000000000">
413 2.5 Command Structure
</A>
415 A command is exactly one line long, with the syntax
419 [id] command_name [arguments]
423 Here
<TT>id
</TT> is an optional identity number and
424 <TT>command_name
</TT> a string. The rest of the line (up to the first
425 newline) gives the arguments of the command.
429 <H2><A NAME=
"SECTION00036000000000000000">
430 2.6 Response Structure
</A>
432 If successful, the engine returns a response of the form
440 Here '
<TT>=
</TT>' indicates success,
<TT>id
</TT> is the identity
441 number given in the command, and
<TT>result
</TT> is a piece of text
442 ending with two consecutive newlines.
446 <H2><A NAME=
"SECTION00037000000000000000">
447 2.7 Error Messages
</A>
449 If unsuccessful, the engine returns a response of the form
457 Here '
<TT>?
</TT>' indicates failure,
<TT>id
</TT> is the identity
458 number given in the command, and
<TT>error_message
</TT> gives an
459 explanation for the failure, also ending with two consecutive
464 <H2><A NAME=
"SECTION00038000000000000000"></A>
465 <A NAME=
"sec:timing"></A>
469 There are no synchronization requirements between the controller and the
470 engine. The controller may send commands at any time, regardless of
471 whether it has obtained responses for previous commands. The engine may
472 send responses whenever they are ready. It must, however, respond to the
473 commands in the same order as they come in. The engine is allowed to
474 make pauses while sending a response.
478 <H2><A NAME=
"SECTION00039000000000000000"></A>
479 <A NAME=
"sec:comments"></A>
483 Comments can be included in the command stream. All text between a
484 hash sign (
<TT>#
</TT>) and the following newline is considered as
485 comments and should be discarded on input.
489 <H2><A NAME=
"SECTION000310000000000000000">
492 Empty lines and lines with only whitespace sent by the controller must
493 be ignored by the engine. No response must be generated. Empty lines and
494 lines with only whitespace sent by the engine and occuring outside a
495 response must be ignored by the controller. Notice that pure comment
496 lines will appear as empty lines after the comment has been discarded.
500 <H2><A NAME=
"SECTION000311000000000000000"></A>
501 <A NAME=
"sec:board-coordinates"></A>
503 2.11 Board Coordinates
505 Board intersections, in this document called vertices, are encoded by a
506 letter plus a number. On a
19x19 board the letters go from A to T,
507 excluding I, from the left to the right. The numbers go from
1 to
19,
508 from the bottom to the top. Thus the lower left corner is called A1, the
509 lower right corner T1, the upper left corner A19, and the upper right
510 corner T19. Smaller boards use the obvious subset of these coordinates.
511 Larger boards, up to
25x25, are handled by extending the letters with U
512 to Z as needed. Boards larger than
25x25 are not supported by the
517 <H2><A NAME=
"SECTION000312000000000000000">
518 2.12 Protocol Subsets
</A>
520 An engine does not have to implement all commands listed in this
521 specification. In general, for an engine to be used with some specific
522 controller, it is only required that the engine understands exactly the
523 commands needed by that controller. To simplify this matching of
524 capabilities, there are two predefined protocol subsets called the
525 tournament and the regression subsets. There is also a small set of
526 commands required for all GTP supporting engines.
530 <H2><A NAME=
"SECTION000313000000000000000"></A>
531 <A NAME=
"sec:private-extensions"></A>
533 2.13 Private Extensions
535 The protocol is trivial to extend with new commands. Obviously there is
536 a risk for conflicts if multiple engines make incompatible private
537 extensions of the protocol or if an engine makes a private extension
538 which turns out to be incompatible with a future extension of the
542 In order to avoid this problem, standard commands do not include the
543 dash (
<TT>-
</TT>) character. Private extensions are recommended to be of
544 the form
<TT>XXX-YYYYY
</TT>, where
<TT>XXX
</TT> is a prefix which is
545 sufficiently unique for the engine or controller in question, and
546 <TT>YYYYY
</TT> describes the command. E.g. a private variant of the
547 <TT>genmove
</TT> command used by GNU Go could be called
551 Engines are allowed to use private extensions without a dash in the
552 name, but then they do it at their own risk and must be prepared to
553 change if the name later becomes used for a standard command.
557 <H2><A NAME=
"SECTION000314000000000000000">
558 2.14 Panic Situations
</A>
560 If an engine for some reason, e.g. an internal error, finds itself in a
561 position where it cannot meaningfully continue the session, the correct
562 action is to just close the connection. This is also what typically will
563 happen if the program should happen to encounter an uncontrolled crash.
567 <H1><A NAME=
"SECTION00040000000000000000">
568 3 Protocol Details
</A>
571 <H2><A NAME=
"SECTION00041000000000000000"></A>
572 <A NAME=
"sec:preprocessing"></A>
578 When a command string arrives to an engine, it is expected to perform
579 the following four operations before any further parsing takes place:
582 <LI><A NAME=
"it:remove-control"></A> Remove all occurences of CR and other
583 control characters except for HT and LF.
585 <LI>For each line with a hash sign (#), remove all text following and
586 including this character.
588 <LI><A NAME=
"it:convert-ht"></A> Convert all occurences of HT to SPACE.
590 <LI>Discard any empty or white-space only lines.
595 When a response arrives to a controller, it is expected only to do steps
596 <A HREF=
"gtp2-spec.html#it:remove-control">1</A> and
<A HREF=
"gtp2-spec.html#it:convert-ht">3</A> above.
599 Naturally an implementation does not have to actually do this
600 preprocessing as a separate step but may interleave it with other
601 parts of the parsing. For purposes of the following specifications,
602 though, the preprocessing is supposed to have been carried out in
607 <H2><A NAME=
"SECTION00042000000000000000">
608 3.2 Syntactic Entities
</A>
613 <H3><A NAME=
"SECTION00042100000000000000"></A>
614 <A NAME=
"sec:simple-entities"></A>
616 3.2.1 Simple Entities
622 An
<TT>int
</TT> is an unsigned integer in the interval
<!-- MATH
627 WIDTH=
"137" HEIGHT=
"33" ALIGN=
"MIDDLE" BORDER=
"0"
629 ALT=
"$0 <= x <=
636 A
<TT>float
</TT> is a floating point number representable by a
32
643 A
<TT>string
</TT> is a sequence of printable, non-whitespace
644 characters. Strings are case sensitive.
650 A
<TT>vertex
</TT> is a board coordinate consisting of one letter and
651 one number, as defined in section
<A HREF=
"gtp2-spec.html#sec:board-coordinates">2.11</A>, or
652 the string ``pass''. Vertices are not case sensitive. Examples:
659 A
<TT>color
</TT> is one of the strings ``white'' or ``w'' to denote
660 white, or ``black'' or ``b'' to denote black. Colors are not case
667 A
<TT>move
</TT> is the combination of one
<TT>color
</TT> and one
668 <TT>vertex
</TT>, separated by space. Moves are not case sensitive.
669 Examples: ``white
h10'', ``B
F5'', ``w
pass''.
675 A
<TT>boolean
</TT> is one of the strings ``false'' and ``true''.
681 <H3><A NAME=
"SECTION00042200000000000000"></A>
682 <A NAME=
"sec:compound-entities"></A>
684 3.2.2 Compound Entities
690 <LI><B>Collection
</B>
692 An
<TT>{x y}
</TT> is an
<TT>x
</TT> followed by a
<TT>y
</TT>,
693 separated by a space.
<TT>x
</TT> and
<TT>y
</TT> may be any
694 combination of simple entities. The construction can be generalized
695 to any fixed number of entities.
701 An
<TT>x*
</TT> is a space separated list of entities of type
702 <TT>x
</TT>, where
<TT>x
</TT> may be any of the entities specified so
703 far. The list can have an arbitrary number of elements and goes on
704 until an LF is encountered.
708 <LI><B>Alternatives
</B>
711 WIDTH=
"8" HEIGHT=
"31" ALIGN=
"MIDDLE" BORDER=
"0"
713 ALT=
"$\vert$">y
</TT> is either an
<TT>x
</TT> or a
<TT>y
</TT>.
717 <LI><B>Multiline list
</B>
719 An
<TT>x
&</TT> is an LF separated list of entities of type
720 <TT>x
</TT>, where
<TT>x
</TT> may be any of the entities specified so
721 far. The multiline list can have an arbitrary number of lines and
722 goes on until two consecutive LFs are encountered.
728 <H2><A NAME=
"SECTION00043000000000000000">
731 A command has one of the syntaxes
735 id command_name arguments\n
737 command_name arguments\n
744 <LI><TT>id
</TT> is an optional
<TT>int
</TT>.
746 <LI><TT>command_name
</TT> is a
<TT>string
</TT>.
748 <LI><TT>arguments
</TT> is a space separated list of some collection
749 of entities, the composition of which varies with the command If
750 <TT>arguments
</TT> is missing it counts as empty.
756 <H2><A NAME=
"SECTION00044000000000000000">
757 3.4 Success Responses
</A>
759 A successful response has one of the syntaxes
772 <LI><TT>id
</TT> is an optional
<TT>int
</TT> and must be the same
773 number as in the corresponding command. It may be omitted if and
774 only if it was omitted in the command.
776 <LI><TT>response
</TT> is some collection of entities, separated by
777 space or a single LF, the composition of which varies with the
778 command. The response may be empty.
784 <H2><A NAME=
"SECTION00045000000000000000">
785 3.5 Failure Responses
</A>
787 An unsuccessful response has one of the syntaxes
789 ?id error_message\n\n
796 <LI><TT>id
</TT> is an optional
<TT>int
</TT> and must be the same
797 number as in the corresponding command. It may be omitted if and
798 only if it was omitted in the command.
800 <LI><TT>error_message
</TT> is a
<TT>string*
&</TT>.
806 <H2><A NAME=
"SECTION00046000000000000000"></A>
807 <A NAME=
"sec:standard-error-messages"></A>
809 3.6 Standard Error Messages
813 If the engine receives an unknown or unimplemented command, use the
814 error message ``unknown
command''. Some commands fail in certain cases
815 with standardized error messages. Those are listed in the command
816 descriptions in section
<A HREF=
"gtp2-spec.html#sec:list-of-all-commands">6.3</A>. For other
817 failures the engine can freely choose error message.
821 <H1><A NAME=
"SECTION00050000000000000000">
822 4 Important Concepts
</A>
827 <H2><A NAME=
"SECTION00051000000000000000">
828 4.1 Handicap Placement
</A>
832 The protocol supports both fixed placement of handicap stones and free
833 placement. The handicap stones are always black.
837 <H3><A NAME=
"SECTION00051100000000000000"></A>
838 <A NAME=
"sec:fixed-handicap-placement"></A>
840 4.1.1 Fixed Handicap Placement
844 With fixed placement the handicap stones are set in predetermined
845 positions. The maximum number of fixed handicap stones varies with the
846 board size but is never larger than
9. On a
19x19 board, the positions
847 for the handicap stones are given by this table:
850 <TABLE CELLPADDING=
3>
851 <TR><TD ALIGN=
"CENTER">Handicap
</TD>
852 <TD ALIGN=
"LEFT">Vertices
</TD>
854 <TR><TD ALIGN=
"CENTER">2</TD>
855 <TD ALIGN=
"LEFT">D4 Q16
</TD>
857 <TR><TD ALIGN=
"CENTER">3</TD>
858 <TD ALIGN=
"LEFT">D4 Q16 D16
</TD>
860 <TR><TD ALIGN=
"CENTER">4</TD>
861 <TD ALIGN=
"LEFT">D4 Q16 D16 Q4
</TD>
863 <TR><TD ALIGN=
"CENTER">5</TD>
864 <TD ALIGN=
"LEFT">D4 Q16 D16 Q4 K10
</TD>
866 <TR><TD ALIGN=
"CENTER">6</TD>
867 <TD ALIGN=
"LEFT">D4 Q16 D16 Q4 D10 Q10
</TD>
869 <TR><TD ALIGN=
"CENTER">7</TD>
870 <TD ALIGN=
"LEFT">D4 Q16 D16 Q4 D10 Q10 K10
</TD>
872 <TR><TD ALIGN=
"CENTER">8</TD>
873 <TD ALIGN=
"LEFT">D4 Q16 D16 Q4 D10 Q10 K4 K16
</TD>
875 <TR><TD ALIGN=
"CENTER">9</TD>
876 <TD ALIGN=
"LEFT">D4 Q16 D16 Q4 D10 Q10 K4 K16 K10
</TD>
881 The placement of handicap stones on other board sizes mirrors that of
882 19x19 with stones at a specific distance from the edges and on the
883 middle lines of the board, with the following caveats:
888 <LI>For boards smaller than
13x13, the edge stones are placed on the third
889 line instead of on the fourth line.
891 <LI>For boards of even size there is no middle line and therefore no
892 handicaps larger than
4.
894 <LI>Boards of size
7x7 have at most
4 handicap stones.
896 <LI>No handicap for boards smaller than
7x7.
901 More explicitly we obtain the following table:
904 <TABLE CELLPADDING=
3>
905 <TR><TD ALIGN=
"CENTER">board size
</TD>
906 <TD ALIGN=
"CENTER">max handicap
</TD>
907 <TD ALIGN=
"CENTER">edge distance
</TD>
909 <TR><TD ALIGN=
"CENTER">25</TD>
910 <TD ALIGN=
"CENTER">9</TD>
911 <TD ALIGN=
"CENTER">4</TD>
913 <TR><TD ALIGN=
"CENTER">24</TD>
914 <TD ALIGN=
"CENTER">4</TD>
915 <TD ALIGN=
"CENTER">4</TD>
917 <TR><TD ALIGN=
"CENTER">23</TD>
918 <TD ALIGN=
"CENTER">9</TD>
919 <TD ALIGN=
"CENTER">4</TD>
921 <TR><TD ALIGN=
"CENTER">22</TD>
922 <TD ALIGN=
"CENTER">4</TD>
923 <TD ALIGN=
"CENTER">4</TD>
925 <TR><TD ALIGN=
"CENTER">21</TD>
926 <TD ALIGN=
"CENTER">9</TD>
927 <TD ALIGN=
"CENTER">4</TD>
929 <TR><TD ALIGN=
"CENTER">20</TD>
930 <TD ALIGN=
"CENTER">4</TD>
931 <TD ALIGN=
"CENTER">4</TD>
933 <TR><TD ALIGN=
"CENTER">19</TD>
934 <TD ALIGN=
"CENTER">9</TD>
935 <TD ALIGN=
"CENTER">4</TD>
937 <TR><TD ALIGN=
"CENTER">18</TD>
938 <TD ALIGN=
"CENTER">4</TD>
939 <TD ALIGN=
"CENTER">4</TD>
941 <TR><TD ALIGN=
"CENTER">17</TD>
942 <TD ALIGN=
"CENTER">9</TD>
943 <TD ALIGN=
"CENTER">4</TD>
945 <TR><TD ALIGN=
"CENTER">16</TD>
946 <TD ALIGN=
"CENTER">4</TD>
947 <TD ALIGN=
"CENTER">4</TD>
949 <TR><TD ALIGN=
"CENTER">15</TD>
950 <TD ALIGN=
"CENTER">9</TD>
951 <TD ALIGN=
"CENTER">4</TD>
953 <TR><TD ALIGN=
"CENTER">14</TD>
954 <TD ALIGN=
"CENTER">4</TD>
955 <TD ALIGN=
"CENTER">4</TD>
957 <TR><TD ALIGN=
"CENTER">13</TD>
958 <TD ALIGN=
"CENTER">9</TD>
959 <TD ALIGN=
"CENTER">4</TD>
961 <TR><TD ALIGN=
"CENTER">12</TD>
962 <TD ALIGN=
"CENTER">4</TD>
963 <TD ALIGN=
"CENTER">3</TD>
965 <TR><TD ALIGN=
"CENTER">11</TD>
966 <TD ALIGN=
"CENTER">9</TD>
967 <TD ALIGN=
"CENTER">3</TD>
969 <TR><TD ALIGN=
"CENTER">10</TD>
970 <TD ALIGN=
"CENTER">4</TD>
971 <TD ALIGN=
"CENTER">3</TD>
973 <TR><TD ALIGN=
"CENTER">9</TD>
974 <TD ALIGN=
"CENTER">9</TD>
975 <TD ALIGN=
"CENTER">3</TD>
977 <TR><TD ALIGN=
"CENTER">8</TD>
978 <TD ALIGN=
"CENTER">4</TD>
979 <TD ALIGN=
"CENTER">3</TD>
981 <TR><TD ALIGN=
"CENTER">7</TD>
982 <TD ALIGN=
"CENTER">4</TD>
983 <TD ALIGN=
"CENTER">3</TD>
985 <TR><TD ALIGN=
"CENTER">6</TD>
986 <TD ALIGN=
"CENTER">-
</TD>
987 <TD ALIGN=
"CENTER">-
</TD>
989 <TR><TD ALIGN=
"CENTER">5</TD>
990 <TD ALIGN=
"CENTER">-
</TD>
991 <TD ALIGN=
"CENTER">-
</TD>
993 <TR><TD ALIGN=
"CENTER">4</TD>
994 <TD ALIGN=
"CENTER">-
</TD>
995 <TD ALIGN=
"CENTER">-
</TD>
997 <TR><TD ALIGN=
"CENTER">3</TD>
998 <TD ALIGN=
"CENTER">-
</TD>
999 <TD ALIGN=
"CENTER">-
</TD>
1001 <TR><TD ALIGN=
"CENTER">2</TD>
1002 <TD ALIGN=
"CENTER">-
</TD>
1003 <TD ALIGN=
"CENTER">-
</TD>
1009 <H3><A NAME=
"SECTION00051200000000000000"></A>
1010 <A NAME=
"sec:free-handicap-placement"></A>
1012 4.1.2 Free Handicap Placement
1016 With free placement the handicap stones are set as chosen by the
1017 controller or by one of the engines (for normal tournament use the
1018 engine playing the black stones would make the choice). The smallest
1019 number of handicap stones is
2. The highest number is one less the
1020 number of vertices on the board. However, when the number of handicap
1021 stones becomes very high there is no benefit in additional stones.
1022 Therefore, when asked to choose handicap placement, an engine is
1023 allowed to return a smaller number of stones than requested. This
1024 provision should only be used if the requested number of stones is so
1025 high that a smaller number of stones is believed to guarantee that the
1026 engine cannot possibly lose against any opponent.
1030 <H2><A NAME=
"SECTION00052000000000000000"></A>
1031 <A NAME=
"sec:time-handling"></A>
1037 The protocol has support for Canadian byo yomi, including absolute
1038 time (no byo yomi) as a special case. Canadian byo yomi is
1039 characterized by the three parameters
1043 WIDTH=
"18" HEIGHT=
"14" ALIGN=
"BOTTOM" BORDER=
"0"
1047 <LI>Byo yomi time
<IMG
1048 WIDTH=
"11" HEIGHT=
"15" ALIGN=
"BOTTOM" BORDER=
"0"
1052 <LI>Byo yomi stones
<IMG
1053 WIDTH=
"12" HEIGHT=
"14" ALIGN=
"BOTTOM" BORDER=
"0"
1058 The semantics is that the clock is first set to
<IMG
1059 WIDTH=
"18" HEIGHT=
"14" ALIGN=
"BOTTOM" BORDER=
"0"
1062 engine has no requirements on the number of stones while this time is
1063 running. When it is up, the clock is reset to
<IMG
1064 WIDTH=
"11" HEIGHT=
"15" ALIGN=
"BOTTOM" BORDER=
"0"
1067 engine has to play
<IMG
1068 WIDTH=
"12" HEIGHT=
"14" ALIGN=
"BOTTOM" BORDER=
"0"
1070 ALT=
"$s$"> stones before this time is up. When
<IMG
1071 WIDTH=
"12" HEIGHT=
"14" ALIGN=
"BOTTOM" BORDER=
"0"
1074 have been played, the clock is reset to
<IMG
1075 WIDTH=
"11" HEIGHT=
"15" ALIGN=
"BOTTOM" BORDER=
"0"
1077 ALT=
"$b$">, regardless of
1078 remaining time. Then the engine has to play another
<IMG
1079 WIDTH=
"12" HEIGHT=
"14" ALIGN=
"BOTTOM" BORDER=
"0"
1081 ALT=
"$s$"> stones before
1082 the time is up. This procedure repeats until the game is over. If an
1083 engine fails to play
<IMG
1084 WIDTH=
"12" HEIGHT=
"14" ALIGN=
"BOTTOM" BORDER=
"0"
1086 ALT=
"$s$"> stones before its byo yomi time is up, it
1091 WIDTH=
"47" HEIGHT=
"14" ALIGN=
"BOTTOM" BORDER=
"0"
1093 ALT=
"$m=0$"> means that the engine immediately starts in byo yomi.
1095 WIDTH=
"40" HEIGHT=
"15" ALIGN=
"BOTTOM" BORDER=
"0"
1097 ALT=
"$b=0$"> means that if the main time is up before the game is
1098 over, the engine loses on time. Setting
<IMG
1099 WIDTH=
"40" HEIGHT=
"29" ALIGN=
"MIDDLE" BORDER=
"0"
1101 ALT=
"$b>0$"> and
<IMG
1102 WIDTH=
"41" HEIGHT=
"14" ALIGN=
"BOTTOM" BORDER=
"0"
1104 ALT=
"$s=0$"> means no time
1109 <H2><A NAME=
"SECTION00053000000000000000"></A>
1110 <A NAME=
"sec:scoring"></A>
1116 Depending on the exact choice of rules (see also section
1117 <A HREF=
"gtp2-spec.html#sec:missing-features">8.3</A>), scoring a finished game may be more or
1118 less complex. With a few exceptions it is critical to determine which
1119 stones are dead and which are alive. Sometimes it is also necessary to
1120 distinguish between life in seki and independent life.
1123 This protocol provides two commands to query the engines about score
1124 and group status. They are both valid only when the game is finished.
1127 The first command,
<TT>final_score
</TT>, asks for the engine's
1128 opinion about the score. The result is returned as a string of the
1129 form
<TT>W+
2.5</TT> if white wins,
<TT>B+
31</TT> if black wins, and
1130 just
<TT>0</TT> if the game ends in a draw. The number in the result
1131 is of course the difference between the number of points for each
1132 player, including komi.
1135 The second command,
<TT>final_status_list
</TT>, is used to query an
1136 engine about the status of the stones. This command takes a string
1137 argument which may be one of
<TT>alive
</TT>,
<TT>seki
</TT>, and
1138 <TT>dead
</TT>. The result is reported by listing all stones having the
1139 requested status. The list is organized with one string per line. If
1140 an engine cannot distinguish between life in seki and independent
1141 life, all those stones should be reported as alive.
1144 The protocol does not include any support for resolving disagreement
1145 about status or score.
1149 <H1><A NAME=
"SECTION00060000000000000000">
1150 5 Internal State
</A>
1155 <H2><A NAME=
"SECTION00061000000000000000"></A>
1156 <A NAME=
"sec:state-variables"></A>
1162 An engine is expected to keep track of the following state information:
1169 <LI>board configuration
1171 <LI>number of captured stones of either color
1183 <H2><A NAME=
"SECTION00062000000000000000"></A>
1184 <A NAME=
"sec:default-state"></A>
1190 There is no default state for any state variable. When first started,
1191 the engine may set these as it likes. A controller which has some
1192 specific opinion about these values must set them explicitly with the
1193 appropriate commands, including clearing the board.
1197 <H2><A NAME=
"SECTION00063000000000000000">
1198 5.3 State Maintenance
</A>
1202 The state is changed by certain commands, as specified in their
1203 description in section
<A HREF=
"gtp2-spec.html#sec:commands">6</A>. State which is not explicitly
1204 modified must remain unchanged. A failed command must never change any
1209 <H1><A NAME=
"SECTION00070000000000000000"></A>
1210 <A NAME=
"sec:commands"></A>
1215 <H2><A NAME=
"SECTION00071000000000000000">
1216 6.1 Required Commands
</A>
1218 All implementations are required to support the following commands:
1237 <H2><A NAME=
"SECTION00072000000000000000">
1238 6.2 Protocol Subsets
</A>
1241 <H3><A NAME=
"SECTION00072100000000000000">
1242 6.2.1 Tournament
</A>
1244 The tournament subset adds the commands:
1253 <H3><A NAME=
"SECTION00072200000000000000">
1254 6.2.2 Regression
</A>
1256 The regression subset adds the commands:
1264 <H2><A NAME=
"SECTION00073000000000000000"></A>
1265 <A NAME=
"sec:list-of-all-commands"></A>
1267 6.3 List of All Commands
1272 <H3><A NAME=
"SECTION00073100000000000000">
1273 6.3.1 Adminstrative Commands
</A>
1279 <LI><B>protocol_version
</B>
1280 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1281 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1282 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1284 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1285 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1287 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1288 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>version_number
</TT></TD>
1290 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1291 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>int version_number
</TT> - Version of the GTP Protocol
</TD>
1293 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1294 <TD ALIGN=
"LEFT" WIDTH=
"90%">never
</TD>
1296 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1297 <TD ALIGN=
"LEFT" WIDTH=
"90%">For this specification
2.
</TD>
1305 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1306 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1307 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1309 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1310 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1312 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1313 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>name
</TT></TD>
1315 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1316 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>string* name
</TT> - Name of the engine
</TD>
1318 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1319 <TD ALIGN=
"LEFT" WIDTH=
"90%">never
</TD>
1321 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1322 <TD ALIGN=
"LEFT" WIDTH=
"90%">E.g. ``GNU Go'', ``GoLois'', ``Many Faces of Go''. The
1323 name does not include any version information, which is provided by
1324 the
<TT>version
</TT> command.
</TD>
1331 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1332 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1333 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1335 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1336 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1338 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1339 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>version
</TT></TD>
1341 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1342 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>string* version
</TT> - Version of the engine
</TD>
1344 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1345 <TD ALIGN=
"LEFT" WIDTH=
"90%">never
</TD>
1347 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1348 <TD ALIGN=
"LEFT" WIDTH=
"90%">E.g. ``
3.1.33'', ``
10.5''. Engines without a sense of version
1349 number should return the empty string.
</TD>
1355 <LI><B>known_command
</B>
1356 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1357 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1358 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>command_name
</TT></TD>
1360 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1361 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>string command_name
</TT> - Name of a command
</TD>
1363 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1364 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1366 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1367 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>known
</TT></TD>
1369 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1370 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>boolean known
</TT> - ``true'' if the command is known by the
1371 engine, ``false'' otherwise
</TD>
1373 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1374 <TD ALIGN=
"LEFT" WIDTH=
"90%">never
</TD>
1376 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1377 <TD ALIGN=
"LEFT" WIDTH=
"90%">The protocol makes no distinction between unknown commands
1378 and known but unimplemented ones. Do not declare a command
1379 as known if it is known not to work.
</TD>
1385 <LI><B>list_commands
</B>
1386 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1387 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1388 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1390 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1391 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1393 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1394 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>commands
</TT></TD>
1396 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1397 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>string
& commands
</TT> - List of commands, one per row
</TD>
1399 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1400 <TD ALIGN=
"LEFT" WIDTH=
"90%">never
</TD>
1402 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1403 <TD ALIGN=
"LEFT" WIDTH=
"90%">Include all known commands, including required ones and
1404 private extensions.
</TD>
1411 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1412 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1413 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1415 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1416 <TD ALIGN=
"LEFT" WIDTH=
"90%">The session is terminated and the connection is closed.
</TD>
1418 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1419 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1421 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1422 <TD ALIGN=
"LEFT" WIDTH=
"90%">never
</TD>
1424 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1425 <TD ALIGN=
"LEFT" WIDTH=
"90%">The full response of this command must be sent before the
1426 engine closes the connection. The controller must receive
1427 the response before the connection is closed on its side.
</TD>
1435 <H3><A NAME=
"SECTION00073200000000000000">
1436 6.3.2 Setup Commands
</A>
1440 <LI><B>boardsize
</B>
1441 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1442 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1443 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>size
</TT></TD>
1445 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1446 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>int size
</TT> - New size of the board.
</TD>
1448 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1449 <TD ALIGN=
"LEFT" WIDTH=
"90%">The board size is changed.
1450 The board configuration, number of captured stones, and move
1451 history become arbitrary.
</TD>
1453 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1454 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1456 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1457 <TD ALIGN=
"LEFT" WIDTH=
"90%">Syntax error. If the engine cannot handle the new
1458 size, fails with the error message
1459 "unacceptable size".
</TD>
1461 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1462 <TD ALIGN=
"LEFT" WIDTH=
"90%">In GTP version
1 this command also did the work of
1463 <TT>clear_board
</TT>. This may or may not be true for
1464 implementations of GTP version
2. Thus the controller must
1465 call
<TT>clear_board
</TT> explicitly.
1466 Even if the new board size is the same as the old one,
1467 the board configuration becomes arbitrary.
</TD>
1473 <LI><B>clear_board
</B>
1474 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1475 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1476 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1478 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1479 <TD ALIGN=
"LEFT" WIDTH=
"90%">The board is cleared, the number of captured stones is
1480 reset to zero for both colors and the move history is reset
1483 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1484 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1486 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1487 <TD ALIGN=
"LEFT" WIDTH=
"90%">never
</TD>
1489 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1490 <TD ALIGN=
"LEFT" WIDTH=
"90%"> </TD>
1497 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1498 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1499 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>new_komi
</TT></TD>
1501 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1502 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>float new_komi
</TT> - New value of komi.
</TD>
1504 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1505 <TD ALIGN=
"LEFT" WIDTH=
"90%">Komi is changed.
</TD>
1507 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1508 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1510 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1511 <TD ALIGN=
"LEFT" WIDTH=
"90%">syntax error
</TD>
1513 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1514 <TD ALIGN=
"LEFT" WIDTH=
"90%">The engine must accept the komi even if it should be
1521 <LI><B>fixed_handicap
</B>
1522 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1523 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1524 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>number_of_stones
</TT></TD>
1526 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1527 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>int number_of_stones
</TT> - Number of handicap stones.
</TD>
1529 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1530 <TD ALIGN=
"LEFT" WIDTH=
"90%">Handicap stones are placed on the board according to the
1531 specification in section
<A HREF=
"gtp2-spec.html#sec:fixed-handicap-placement">4.1.1</A>.
</TD>
1533 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1534 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>vertices
</TT></TD>
1536 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1537 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>vertex* vertices
</TT> - A list of the vertices where
1538 handicap stones have been placed.
</TD>
1540 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1541 <TD ALIGN=
"LEFT" WIDTH=
"90%">syntax error, invalid number of stones, board not empty
</TD>
1543 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1544 <TD ALIGN=
"LEFT" WIDTH=
"90%">This command is only valid if the board is empty.
1545 See section
<A HREF=
"gtp2-spec.html#sec:fixed-handicap-placement">4.1.1</A> for
1546 valid number of handicap stones.
1547 The handicap stones are
<I>not
</I> included in the move
1555 <LI><B>place_free_handicap
</B>
1556 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1557 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1558 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>number_of_stones
</TT></TD>
1560 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1561 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>int number_of_stones
</TT> - Number of handicap stones.
</TD>
1563 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1564 <TD ALIGN=
"LEFT" WIDTH=
"90%">Handicap stones are placed on the board on the vertices the
1565 engine prefers. See also section
1566 <A HREF=
"gtp2-spec.html#sec:free-handicap-placement">4.1.2</A>.
</TD>
1568 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1569 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>vertices
</TT></TD>
1571 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1572 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>vertex* vertices
</TT> - A list of the vertices where
1573 handicap stones have been placed.
</TD>
1575 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1576 <TD ALIGN=
"LEFT" WIDTH=
"90%">syntax error, invalid number of stones, board not
1577 empty, bad vertex list
</TD>
1579 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1580 <TD ALIGN=
"LEFT" WIDTH=
"90%">This command is only valid if the board is empty.
1581 The engine may place fewer than the requested number of
1582 stones on the board under certain circumstances, as
1583 discussed in section
<A HREF=
"gtp2-spec.html#sec:free-handicap-placement">4.1.2</A>.
1584 The controller can check this by
1585 counting the number of vertices in the response.
1586 The handicap stones are
<I>not
</I> included in the move
1587 history. Vertices must not be repeated or include ``pass''.
</TD>
1593 <LI><B>set_free_handicap
</B>
1594 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1595 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1596 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>vertices
</TT></TD>
1598 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1599 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>vertex* vertices
</TT> - A list of vertices where handicap
1600 stones should be placed on the board.
</TD>
1602 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1603 <TD ALIGN=
"LEFT" WIDTH=
"90%">Handicap stones are placed on the vertices as requested.
</TD>
1605 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1606 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1608 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1609 <TD ALIGN=
"LEFT" WIDTH=
"90%">syntax error, board not empty, bad vertex list
</TD>
1611 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1612 <TD ALIGN=
"LEFT" WIDTH=
"90%">This command is only valid if the board is empty.
1613 The list must have at least two elements and no more than
1614 the number of board vertices minus one.
1615 The engine must accept the handicap placement.
1616 The handicap stones are
<I>not
</I> included in the move
1617 history. Vertices must not be repeated or include ``pass''.
</TD>
1625 <H3><A NAME=
"SECTION00073300000000000000">
1626 6.3.3 Core Play Commands
</A>
1631 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1632 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1633 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>move
</TT></TD>
1635 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1636 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>move move
</TT> - Color and vertex of the move
</TD>
1638 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1639 <TD ALIGN=
"LEFT" WIDTH=
"90%">A stone of the requested color is played at the requested
1640 vertex. The number of captured stones is updated if needed
1641 and the move is added to the move history.
</TD>
1643 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1644 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1646 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1647 <TD ALIGN=
"LEFT" WIDTH=
"90%">syntax error, illegal move. In the latter case, fails
1648 with the error message ``illegal
move''.
</TD>
1650 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1651 <TD ALIGN=
"LEFT" WIDTH=
"90%">Consecutive moves of the same color are not considered
1652 illegal from the protocol point of view.
</TD>
1660 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1661 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1662 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>color
</TT></TD>
1664 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1665 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>color color
</TT> - Color for which to generate a move.
</TD>
1667 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1668 <TD ALIGN=
"LEFT" WIDTH=
"90%">A stone of the requested color is played where the engine
1669 chooses. The number of captured stones is updated if needed
1670 and the move is added to the move history.
</TD>
1672 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1673 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>vertex
</TT></TD>
1675 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1676 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>vertex
<IMG
1677 WIDTH=
"8" HEIGHT=
"31" ALIGN=
"MIDDLE" BORDER=
"0"
1679 ALT=
"$\vert$">string vertex
</TT> - Vertex where the move was
1680 played or the string ``resign''.
</TD>
1682 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1683 <TD ALIGN=
"LEFT" WIDTH=
"90%">never
</TD>
1685 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1686 <TD ALIGN=
"LEFT" WIDTH=
"90%">Notice that ``pass'' is a valid vertex and should
1687 be returned if the engine wants to pass. Use
1688 ``resign'' if you want to give up the game. The
1689 controller is allowed to use this command for either
1690 color, regardless who played the last move.
</TD>
1697 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1698 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1699 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1701 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1702 <TD ALIGN=
"LEFT" WIDTH=
"90%">The board configuration and the number of captured stones
1703 are reset to the state before the last move. The last move
1704 is removed from the move history.
</TD>
1706 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1707 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1709 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1710 <TD ALIGN=
"LEFT" WIDTH=
"90%">If the engine is unable to take back the last move, fails
1711 with the error message
"cannot undo".
</TD>
1713 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1714 <TD ALIGN=
"LEFT" WIDTH=
"90%">If you want to take back multiple moves, use this command
1716 The engine may fail to undo if the move history is empty or
1717 if the engine only maintains a partial move history, which
1718 has been exhausted by previous undos.
1719 It is never possible to undo handicap placements. Use
1720 clear_board if you want to start over.
1721 An engine which never is able to undo should not include
1722 this command among its known commands.
</TD>
1730 <H3><A NAME=
"SECTION00073400000000000000">
1731 6.3.4 Tournament Commands
</A>
1735 <LI><B>time_settings
</B>
1736 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1737 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1738 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>main_time byo_yomi_time byo_yomi_stones
</TT></TD>
1740 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1741 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>int main_time
</TT> - Main time measured in seconds.
</TD>
1743 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1744 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>int byo_yomi_time
</TT> - Byo yomi time measured in seconds.
</TD>
1746 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1747 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>int byo_yomi_stones
</TT> - Number of stones per byo yomi period.
</TD>
1749 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1750 <TD ALIGN=
"LEFT" WIDTH=
"90%">The time settings are changed.
</TD>
1752 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1753 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1755 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1756 <TD ALIGN=
"LEFT" WIDTH=
"90%">syntax error
</TD>
1758 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1759 <TD ALIGN=
"LEFT" WIDTH=
"90%">The interpretation of the parameters is discussed in
1760 section
<A HREF=
"gtp2-spec.html#sec:time-handling">4.2</A>.
1761 The engine must accept the requested values. This command
1762 gives no provision for negotiation of the time settings.
</TD>
1769 <LI><B>time_left
</B>
1770 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1771 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1772 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>color time stones
</TT></TD>
1774 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1775 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>color color
</TT> - Color for which the information applies.
</TD>
1777 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1778 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>int time
</TT> - Number of seconds remaining.
</TD>
1780 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1781 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>int stones
</TT> - Number of stones remaining.
</TD>
1783 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1784 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1786 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1787 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1789 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1790 <TD ALIGN=
"LEFT" WIDTH=
"90%">syntax error
</TD>
1792 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1793 <TD ALIGN=
"LEFT" WIDTH=
"90%">While the main time is counting, the number of remaining
1794 stones is given as
0.
</TD>
1800 <LI><B>final_score
</B>
1801 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1802 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1803 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1805 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1806 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1808 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1809 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>score
</TT></TD>
1811 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1812 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>string score
</TT> - Score as described in section
1813 <A HREF=
"gtp2-spec.html#sec:scoring">4.3</A>.
</TD>
1815 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1816 <TD ALIGN=
"LEFT" WIDTH=
"90%">If the engine is unable to determine the score, fails
1817 with error message ``cannot
score''.
</TD>
1819 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1820 <TD ALIGN=
"LEFT" WIDTH=
"90%">If the engine never is able to determine the score,
1821 leave the command unimplemented.
</TD>
1827 <LI><B>final_status_list
</B>
1828 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1829 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1830 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>status
</TT></TD>
1832 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1833 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>string status
</TT> - Requested status.
</TD>
1835 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1836 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1838 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1839 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>stones
</TT></TD>
1841 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1842 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>vertex*
& stones
</TT> - Stones with the requested status.
</TD>
1844 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1845 <TD ALIGN=
"LEFT" WIDTH=
"90%">syntax error
</TD>
1847 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1848 <TD ALIGN=
"LEFT" WIDTH=
"90%">See section
<A HREF=
"gtp2-spec.html#sec:scoring">4.3</A> for details.
</TD>
1856 <H3><A NAME=
"SECTION00073500000000000000"></A>
1857 <A NAME=
"sec:regression-commands"></A>
1859 6.3.5 Regression Commands
1864 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1865 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1866 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>filename move_number
</TT></TD>
1868 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1869 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>string filename
</TT> - Name of an sgf file.
</TD>
1871 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1872 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>int move_number
</TT> - Optional move number.
</TD>
1874 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1875 <TD ALIGN=
"LEFT" WIDTH=
"90%">Board size and komi are set to the values given in
1876 the sgf file. Board configuration, number of
1877 captured stones, and move history are found by
1878 replaying the game record up to the position before
1879 <TT>move_number
</TT> or until the end if omitted.
</TD>
1881 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1882 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1884 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1885 <TD ALIGN=
"LEFT" WIDTH=
"90%">Syntax error. If the file does not exist or cannot be
1886 read in because it is broken in some way, fails with
1887 the error message ``cannot
load
file''.
</TD>
1889 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1890 <TD ALIGN=
"LEFT" WIDTH=
"90%">Due to the syntactical limitations of this protocol,
1891 the filename cannot include spaces, hash signs (#),
1892 or control characters. The command requires the
1893 controller and the engine to share file system, or at
1894 least that the controller has sufficient knowledge
1895 about the file system of the engine. If
1896 <TT>move_number
</TT> is larger than the number of
1897 moves in the file, read until the end of the file.
1898 This command has no support for sgf files with
1899 variations or game collections.
</TD>
1905 <LI><B>reg_genmove
</B>
1906 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1907 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1908 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>color
</TT></TD>
1910 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1911 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>color color
</TT> - Color for which to generate a move.
</TD>
1913 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1914 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1916 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1917 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>vertex
</TT></TD>
1919 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1920 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>vertex
<IMG
1921 WIDTH=
"8" HEIGHT=
"31" ALIGN=
"MIDDLE" BORDER=
"0"
1923 ALT=
"$\vert$">string vertex
</TT> - Vertex where the engine would
1924 want to play a move or the string ``resign''.
</TD>
1926 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1927 <TD ALIGN=
"LEFT" WIDTH=
"90%">never
</TD>
1929 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1930 <TD ALIGN=
"LEFT" WIDTH=
"90%">This command differs from
<TT>genmove
</TT> in that it
1931 does not play the generated move. It is also advisable
1932 to turn off any move randomization since that may
1933 cause meaningless regression fluctuations.
</TD>
1941 <H3><A NAME=
"SECTION00073600000000000000">
1942 6.3.6 Debug Commands
</A>
1946 <LI><B>showboard
</B>
1947 <BR> <TABLE CELLPADDING=
3 WIDTH=
"100%">
1948 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">arguments
</TD>
1949 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1951 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">effects
</TD>
1952 <TD ALIGN=
"LEFT" WIDTH=
"90%">none
</TD>
1954 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">output
</TD>
1955 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>board
</TT></TD>
1957 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%"> </TD>
1958 <TD ALIGN=
"LEFT" WIDTH=
"90%"><TT>string*
& board
</TT> - A diagram of the board position.
</TD>
1960 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">fails
</TD>
1961 <TD ALIGN=
"LEFT" WIDTH=
"90%">never
</TD>
1963 <TR><TD ALIGN=
"LEFT" WIDTH=
"10%">comments
</TD>
1964 <TD ALIGN=
"LEFT" WIDTH=
"90%">The engine may draw the board as it likes. It is,
1965 however, required to place the coordinates as
1966 described in section
<A HREF=
"gtp2-spec.html#sec:board-coordinates">2.11</A>.
1967 This command is only intended to help humans with
1968 debugging and the output should never need to be
1969 parsed by another program.
</TD>
1977 <H1><A NAME=
"SECTION00080000000000000000">
1983 <H1><A NAME=
"SECTION00090000000000000000">
1984 8 Comments on the Specification
</A>
1989 <H2><A NAME=
"SECTION00091000000000000000">
1990 8.1 Design Principles
</A>
1994 <LI><A NAME=
"it:design-machine"></A> The protocol is primarily intended for
1995 machine-machine communication. At the same time we want it to be
1996 reasonably human readable as well. There are two principal reasons
1997 for this. The first one is to make it easy to debug a protocol
1998 implementation or to find the error if the communication breaks
1999 down, e.g. if two engines involved in a game get their boards out
2000 of sync. The second reason is to make it easy to online issue GTP
2001 commands, or write scripts, for engine testing.
2004 The protocol is
<I>not
</I> intended as a user interface for playing
2005 games though, even if it can be done for testing purposes.
2009 <LI>The protocol intentionally does not include any negotiation
2010 options. The controller dictates everything and the engine has to
2011 comply, unless it is technically unable to, in which case it has to
2012 fail. While this to some extent limits the power of the protocol, it
2013 considerably simplifies implementation of both engines and
2017 Arguably an engine could fail on purpose as some kind of attempt to
2018 force negotiation. This is not encouraged and is considered bad
2019 style. A controller has absolutely no obligation to try to work
2020 around such failures.
2026 <H2><A NAME=
"SECTION00092000000000000000">
2027 8.2 Detail Comments
</A>
2033 <LI><B><A HREF=
"gtp2-spec.html#sec:communication-model">1.3</A> Communication Model
</B>
2035 That the controller initiates all communication does not imply that
2036 it has to set up the communication
<I>channel
</I>.
2040 <LI><B><A HREF=
"gtp2-spec.html#sec:character-set">2.1</A> Character Set
</B>
2042 ASCII specifies characters in the interval
0-
127, some of which are
2043 control characters. ``Other characters'' refer to characters in the
2044 interval
128-
255, which are available in various character sets
2045 such as the ISO-
8859-x series.
2049 <LI><B><A HREF=
"gtp2-spec.html#sec:whitespace">2.3</A> Whitespace
</B>
2051 The requirement to accept both SPACE and HT but only produce SPACE
2052 applies to both engine and controller. The reason for this asymmetry
2053 is that SPACE is the preferred character but since it for some
2054 purposes can be convenient to write scripts of GTP commands manually
2055 in text files it is conceivable that an HT may occur occasionally.
2059 <LI><B><A HREF=
"gtp2-spec.html#sec:newline-convention">2.4</A> Newline Convention
</B>
2061 The newline convention is easy to implement and allows
2062 interoperability between platforms using LF, CRLF, or LFCR to
2063 indicate newlines. It does not interoperate with the CR only
2064 convention used in text files on MacOS, prior to MacOS X. This is
2065 not expected to be a substantial problem.
2069 <LI><B><A HREF=
"gtp2-spec.html#sec:timing">2.8</A> Timing
</B>
2071 While the communication channels are required to be free from
2072 errors, we do not assume that they are free from delays. For
2073 communication over the internet, random delays are a reality and it
2074 would be unrealistic not to take this into account.
2078 <LI><B><A HREF=
"gtp2-spec.html#sec:comments">2.9</A> Comments
</B>
2080 Comments are mainly useful in regression test suites.
2084 <LI><B><A HREF=
"gtp2-spec.html#sec:board-coordinates">2.11</A> Board Coordinates
</B>
2086 The choice of board coordinates is guided by design principle
2087 <A HREF=
"gtp2-spec.html#it:design-machine">1</A> of the previous section. The alternative to
2088 instead use a pair of integers is slightly easier for a machine to
2089 parse and does not impose any limitations on the maximum board size.
2090 However, the better human readibility of the chosen format is
2091 considered significant enough.
2094 This coordinate convention is identical to the one used on IGS and
2095 many other go servers, and is also used in the specification of the
2100 <LI><B><A HREF=
"gtp2-spec.html#sec:simple-entities">3.2.1</A> Simple Entities
</B>
2102 The only purpose of the
<TT>float
</TT> entity is to specify komi
2103 values. In practice it would suffice to restrict these to small
2104 integers and half-integers, but it is probably better to allow
2105 general floating point numbers anyway.
2109 <LI><B><A HREF=
"gtp2-spec.html#sec:compound-entities">3.2.2</A> Compound Entities
</B>
2111 Since a list can only be stopped by an LF, an entity like
2112 <TT>{int* color*}
</TT> is invalid, although it would technically
2113 be possible to tell the ints from the colors in this particular
2117 For similar reasons constructions of the form
<TT>{x
& y
&}
</TT>
2118 or
<TT>x
&*
</TT> are also invalid.
2121 The multiline list construction cannot be used for commands since these
2122 are terminated by a single LF.
2125 In constructions of the form
<TT>x*
&</TT>, there is no requirement
2126 that every
<TT>x*
</TT> has the same length. I.e., there may be
2127 varying number of elements on each line.
2131 <LI><B><A HREF=
"gtp2-spec.html#sec:standard-error-messages">3.6</A> Standard Error Messages
</B>
2133 Failures can be divided into two classes. In the first class we have
2134 syntactically incorrect commands and other failures of the
2135 controller to follow the specification. In the second class we have
2136 technical limitations of the engine, which the controller cannot
2137 easily foresee in advance.
2140 Only failures in the second class have standard error messages, on
2141 the assumption that these are the only ones the controller need to
2142 take action on. Failures in the first class indicate programming
2143 errors and will require debugging. Thus those error messages may
2144 freely be chosen to best help the debugging.
2148 <LI><B><A HREF=
"gtp2-spec.html#sec:fixed-handicap-placement">4.1.1</A> Fixed Handicap Placement
</B>
2150 This fixed handicap placement is compatible with the Go Modem
2151 Protocol and many go servers.
2155 <LI><B><A HREF=
"gtp2-spec.html#sec:free-handicap-placement">4.1.2</A> Free Handicap Placement
</B>
2157 Filling all vertices but one with handicap stones leave them in
2158 atari and is obviously not attractive for black. Moreover black has
2159 the trivial placement of half the number of stones in a chessboard
2160 pattern which leaves white without a single legal move. It is also
2161 possible to place a smaller number of stones than that so that white
2162 cannot possibly form a single living group. Thus there clearly
2163 exists thresholds above which it is not meaningful to add more
2167 With this in mind it is recommended that every engine has a
2168 threshold of at least
40 stones for
19x19 and a proportional number
2169 for other board sizes. Extremely weak engines are recommended to
2170 provide handicap placements all the way up to the full chessboard
2175 <LI><B><A HREF=
"gtp2-spec.html#sec:time-handling">4.2</A> Time Handling
</B>
2177 The controller is responsible for measuring time and deciding
2178 whether an engine has run out of time. The information given by the
2179 <TT>time_settings
</TT> and
<TT>time_left
</TT> commands is only to
2180 guide the engines about how fast they need to play.
2184 <LI><B><A HREF=
"gtp2-spec.html#sec:scoring">4.3</A> Scoring
</B>
2186 With most rulesets scoring is difficult for computer programs. Only
2187 sophisticated engines can be expected to have reliable scoring while
2188 many engines probably will not implement the scoring commands at
2189 all. A controller is recommended to have external methods available
2190 to decide the winner (e.g. an independent trusted program or a
2191 human reviewer) but there is no reason to invoke them if both
2192 engines implement the scoring commands and agree about the result.
2195 The format of the score string is identical to the RE property in
2200 <LI><B><A HREF=
"gtp2-spec.html#sec:state-variables">5.1</A> State Variables
</B>
2202 An engine which never uses some state for anything does not have to
2203 keep track of it just because it should. The point of the rule is
2204 that the engine is not allowed to suddenly change any state which it
2205 does use, unless instructed to.
2209 <LI><B><A HREF=
"gtp2-spec.html#sec:default-state">5.2</A> Default State
</B>
2211 It may seem natural to require e.g. an empty board when the engine
2212 is started. However, it can also be convenient to be able to start
2213 the engine with e.g. an sgf file already loaded.
2217 <LI><B><A HREF=
"gtp2-spec.html#sec:regression-commands">6.3.5</A> Regression Commands
</B>
2219 GNU Go has a wide array of commands used in regression testing, such
2220 as
<TT>attack
</TT> to test whether a string can be tactically
2221 captured. However, except for simple move generation it is not at
2222 all clear to what extent such commands can be defined in ways which
2223 are meaningful across multiple programs. It is desired to increase
2224 the set of standard regression commands in future protocol
2225 revisions, but it must be done with care.
2228 The reason for a separate
<TT>reg_genmove
</TT> command is that it is
2229 usually desirable to get consistent regression results. I.e. for a
2230 given position the same move should always be generated. In actual
2231 play it is useful to have a random variability between moves of
2232 similar value, in particular in the opening, to avoid playing too
2241 <H2><A NAME=
"SECTION00093000000000000000"></A>
2242 <A NAME=
"sec:missing-features"></A>
2244 8.3 Missing Features
2250 <LI><B>Ruleset Commands and Scoring Options
</B>
2252 This version of the protocol has no provisions to specify what
2253 ruleset and/or scoring options to use. This is planned for future
2254 revisions but has been omitted here due to the complexity of the
2258 The reason why this is considered complex is that there are numerous
2259 rulesets (using the term loosely) such as Japanese, Chinese, AGA,
2260 Ing, IGS, and New Zealand, which differ with respect to one or more
2261 of ko rule, area or territory scoring, scoring of seki, legality of
2262 suicide, effect of handicap stones on scoring, and so on.
2265 As a workaround this kind of information has to be passed through
2266 other channels than GTP, e.g. as command line options when starting
2270 In practice this is not all that much of a problem since these
2271 settings rarely vary between games, e.g. within a tournament. Still
2272 it is desirable to have this functionality in the protocol, but it
2273 is worth waiting for a well thought through design of the commands.
2277 <LI><B>Introspective Commands
</B>
2279 GNU Go includes a large number of commands to query the board, e.g.
2280 list legal moves, find connected strings, count liberties, and so
2281 on. These can be useful when writing a ``stupid'' user interface
2282 which does not itself know anything about the board logic. They have
2283 been omitted from this specification mainly to keep it shorter and
2284 make it look less imposing. They are under consideration for
2285 inclusion in later revisions.
2291 <H2><A NAME=
"SECTION00094000000000000000">
2294 Anyone may use this protocol for any purpose without any restrictions.
2297 This
<I>document
</I> may be copied, modified, and distributed
2298 according to the terms of the GNU Free Documentation License, included
2299 in section
<A HREF=
"gtp2-spec.html#sec:gfdl">10</A>.
2302 While this in theory allows anyone to create modified protocol
2303 specifications, which could potentially lead to great chaos, that
2304 would benefit noone and we trust people not be that stupid.
2307 The reason why we allow modification at all is to make sure that new
2308 authors can continue evolving the protocol if previous authors
2309 disappear, without having to rewrite everything from scratch.
2312 People who want to use this protocol as a basis for development of
2313 some other protocol are most welcome to start from this protocol
2318 <H1><A NAME=
"SECTION000100000000000000000">
2324 <H1><A NAME=
"SECTION000110000000000000000"></A>
2325 <A NAME=
"sec:gfdl"></A>
2327 10 GNU Free Documentation License
2331 Version
1.1, March
2000
2334 Copyright
© 2000 Free Software Foundation, Inc.
2336 59 Temple Place, Suite
330, Boston, MA
02111-
1307 USA
2338 Everyone is permitted to copy and distribute verbatim copies
2339 of this license document, but changing it is not allowed.
2343 <H2><A NAME=
"SECTION000111000000000000000">
2348 The purpose of this License is to make a manual, textbook, or other
2349 written document ``free'' in the sense of freedom: to assure everyone
2350 the effective freedom to copy and redistribute it, with or without
2351 modifying it, either commercially or noncommercially. Secondarily,
2352 this License preserves for the author and publisher a way to get
2353 credit for their work, while not being considered responsible for
2354 modifications made by others.
2357 This License is a kind of ``copyleft'', which means that derivative
2358 works of the document must themselves be free in the same sense. It
2359 complements the GNU General Public License, which is a copyleft
2360 license designed for free software.
2363 We have designed this License in order to use it for manuals for free
2364 software, because free software needs free documentation: a free
2365 program should come with manuals providing the same freedoms that the
2366 software does. But this License is not limited to software manuals;
2367 it can be used for any textual work, regardless of subject matter or
2368 whether it is published as a printed book. We recommend this License
2369 principally for works whose purpose is instruction or reference.
2373 <H2><A NAME=
"SECTION000112000000000000000">
2374 10.1 Applicability and Definitions
</A>
2378 This License applies to any manual or other work that contains a
2379 notice placed by the copyright holder saying it can be distributed
2380 under the terms of this License. The ``Document'', below, refers to any
2381 such manual or work. Any member of the public is a licensee, and is
2382 addressed as ``you''.
2385 A ``Modified Version'' of the Document means any work containing the
2386 Document or a portion of it, either copied verbatim, or with
2387 modifications and/or translated into another language.
2390 A ``Secondary Section'' is a named appendix or a front-matter section of
2391 the Document that deals exclusively with the relationship of the
2392 publishers or authors of the Document to the Document's overall subject
2393 (or to related matters) and contains nothing that could fall directly
2394 within that overall subject. (For example, if the Document is in part a
2395 textbook of mathematics, a Secondary Section may not explain any
2396 mathematics.) The relationship could be a matter of historical
2397 connection with the subject or with related matters, or of legal,
2398 commercial, philosophical, ethical or political position regarding
2402 The ``Invariant Sections'' are certain Secondary Sections whose titles
2403 are designated, as being those of Invariant Sections, in the notice
2404 that says that the Document is released under this License.
2407 The ``Cover Texts'' are certain short passages of text that are listed,
2408 as Front-Cover Texts or Back-Cover Texts, in the notice that says that
2409 the Document is released under this License.
2412 A ``Transparent'' copy of the Document means a machine-readable copy,
2413 represented in a format whose specification is available to the
2414 general public, whose contents can be viewed and edited directly and
2415 straightforwardly with generic text editors or (for images composed of
2416 pixels) generic paint programs or (for drawings) some widely available
2417 drawing editor, and that is suitable for input to text formatters or
2418 for automatic translation to a variety of formats suitable for input
2419 to text formatters. A copy made in an otherwise Transparent file
2420 format whose markup has been designed to thwart or discourage
2421 subsequent modification by readers is not Transparent. A copy that is
2422 not ``Transparent'' is called ``Opaque''.
2425 Examples of suitable formats for Transparent copies include plain
2426 ASCII without markup, Texinfo input format, L
<SUP><SMALL>A
</SMALL></SUP>T
<SMALL>E
</SMALL>X
input format, SGML
2427 or XML using a publicly available DTD, and standard-conforming simple
2428 HTML designed for human modification. Opaque formats include
2429 PostScript, PDF, proprietary formats that can be read and edited only
2430 by proprietary word processors, SGML or XML for which the DTD and/or
2431 processing tools are not generally available, and the
2432 machine-generated HTML produced by some word processors for output
2436 The ``Title Page'' means, for a printed book, the title page itself,
2437 plus such following pages as are needed to hold, legibly, the material
2438 this License requires to appear in the title page. For works in
2439 formats which do not have any title page as such, ``Title Page'' means
2440 the text near the most prominent appearance of the work's title,
2441 preceding the beginning of the body of the text.
2445 <H2><A NAME=
"SECTION000113000000000000000">
2446 10.2 Verbatim Copying
</A>
2450 You may copy and distribute the Document in any medium, either
2451 commercially or noncommercially, provided that this License, the
2452 copyright notices, and the license notice saying this License applies
2453 to the Document are reproduced in all copies, and that you add no other
2454 conditions whatsoever to those of this License. You may not use
2455 technical measures to obstruct or control the reading or further
2456 copying of the copies you make or distribute. However, you may accept
2457 compensation in exchange for copies. If you distribute a large enough
2458 number of copies you must also follow the conditions in section
3.
2461 You may also lend copies, under the same conditions stated above, and
2462 you may publicly display copies.
2466 <H2><A NAME=
"SECTION000114000000000000000">
2467 10.3 Copying in Quantity
</A>
2471 If you publish printed copies of the Document numbering more than
100,
2472 and the Document's license notice requires Cover Texts, you must enclose
2473 the copies in covers that carry, clearly and legibly, all these Cover
2474 Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
2475 the back cover. Both covers must also clearly and legibly identify
2476 you as the publisher of these copies. The front cover must present
2477 the full title with all words of the title equally prominent and
2478 visible. You may add other material on the covers in addition.
2479 Copying with changes limited to the covers, as long as they preserve
2480 the title of the Document and satisfy these conditions, can be treated
2481 as verbatim copying in other respects.
2484 If the required texts for either cover are too voluminous to fit
2485 legibly, you should put the first ones listed (as many as fit
2486 reasonably) on the actual cover, and continue the rest onto adjacent
2490 If you publish or distribute Opaque copies of the Document numbering
2491 more than
100, you must either include a machine-readable Transparent
2492 copy along with each Opaque copy, or state in or with each Opaque copy
2493 a publicly-accessible computer-network location containing a complete
2494 Transparent copy of the Document, free of added material, which the
2495 general network-using public has access to download anonymously at no
2496 charge using public-standard network protocols. If you use the latter
2497 option, you must take reasonably prudent steps, when you begin
2498 distribution of Opaque copies in quantity, to ensure that this
2499 Transparent copy will remain thus accessible at the stated location
2500 until at least one year after the last time you distribute an Opaque
2501 copy (directly or through your agents or retailers) of that edition to
2505 It is requested, but not required, that you contact the authors of the
2506 Document well before redistributing any large number of copies, to give
2507 them a chance to provide you with an updated version of the Document.
2511 <H2><A NAME=
"SECTION000115000000000000000">
2512 10.4 Modifications
</A>
2516 You may copy and distribute a Modified Version of the Document under
2517 the conditions of sections
2 and
3 above, provided that you release
2518 the Modified Version under precisely this License, with the Modified
2519 Version filling the role of the Document, thus licensing distribution
2520 and modification of the Modified Version to whoever possesses a copy
2521 of it. In addition, you must do these things in the Modified Version:
2526 <LI>Use in the Title Page (and on the covers, if any) a title distinct
2527 from that of the Document, and from those of previous versions
2528 (which should, if there were any, be listed in the History section
2529 of the Document). You may use the same title as a previous version
2530 if the original publisher of that version gives permission.
2532 <LI>List on the Title Page, as authors, one or more persons or entities
2533 responsible for authorship of the modifications in the Modified
2534 Version, together with at least five of the principal authors of the
2535 Document (all of its principal authors, if it has less than five).
2537 <LI>State on the Title page the name of the publisher of the
2538 Modified Version, as the publisher.
2540 <LI>Preserve all the copyright notices of the Document.
2542 <LI>Add an appropriate copyright notice for your modifications
2543 adjacent to the other copyright notices.
2545 <LI>Include, immediately after the copyright notices, a license notice
2546 giving the public permission to use the Modified Version under the
2547 terms of this License, in the form shown in the Addendum below.
2549 <LI>Preserve in that license notice the full lists of Invariant Sections
2550 and required Cover Texts given in the Document's license notice.
2552 <LI>Include an unaltered copy of this License.
2554 <LI>Preserve the section entitled ``History'', and its title, and add to
2555 it an item stating at least the title, year, new authors, and
2556 publisher of the Modified Version as given on the Title Page. If
2557 there is no section entitled ``History'' in the Document, create one
2558 stating the title, year, authors, and publisher of the Document as
2559 given on its Title Page, then add an item describing the Modified
2560 Version as stated in the previous sentence.
2562 <LI>Preserve the network location, if any, given in the Document for
2563 public access to a Transparent copy of the Document, and likewise
2564 the network locations given in the Document for previous versions
2565 it was based on. These may be placed in the ``History'' section.
2566 You may omit a network location for a work that was published at
2567 least four years before the Document itself, or if the original
2568 publisher of the version it refers to gives permission.
2570 <LI>In any section entitled ``Acknowledgements'' or ``Dedications'',
2571 preserve the section's title, and preserve in the section all the
2572 substance and tone of each of the contributor acknowledgements
2573 and/or dedications given therein.
2575 <LI>Preserve all the Invariant Sections of the Document,
2576 unaltered in their text and in their titles. Section numbers
2577 or the equivalent are not considered part of the section titles.
2579 <LI>Delete any section entitled ``Endorsements''. Such a section
2580 may not be included in the Modified Version.
2582 <LI>Do not retitle any existing section as ``Endorsements''
2583 or to conflict in title with any Invariant Section.
2590 If the Modified Version includes new front-matter sections or
2591 appendices that qualify as Secondary Sections and contain no material
2592 copied from the Document, you may at your option designate some or all
2593 of these sections as invariant. To do this, add their titles to the
2594 list of Invariant Sections in the Modified Version's license notice.
2595 These titles must be distinct from any other section titles.
2598 You may add a section entitled ``Endorsements'', provided it contains
2599 nothing but endorsements of your Modified Version by various
2600 parties - for example, statements of peer review or that the text has
2601 been approved by an organization as the authoritative definition of a
2605 You may add a passage of up to five words as a Front-Cover Text, and a
2606 passage of up to
25 words as a Back-Cover Text, to the end of the list
2607 of Cover Texts in the Modified Version. Only one passage of
2608 Front-Cover Text and one of Back-Cover Text may be added by (or
2609 through arrangements made by) any one entity. If the Document already
2610 includes a cover text for the same cover, previously added by you or
2611 by arrangement made by the same entity you are acting on behalf of,
2612 you may not add another; but you may replace the old one, on explicit
2613 permission from the previous publisher that added the old one.
2616 The author(s) and publisher(s) of the Document do not by this License
2617 give permission to use their names for publicity for or to assert or
2618 imply endorsement of any Modified Version.
2622 <H2><A NAME=
"SECTION000116000000000000000">
2623 10.5 Combining Documents
</A>
2627 You may combine the Document with other documents released under this
2628 License, under the terms defined in section
4 above for modified
2629 versions, provided that you include in the combination all of the
2630 Invariant Sections of all of the original documents, unmodified, and
2631 list them all as Invariant Sections of your combined work in its
2635 The combined work need only contain one copy of this License, and
2636 multiple identical Invariant Sections may be replaced with a single
2637 copy. If there are multiple Invariant Sections with the same name but
2638 different contents, make the title of each such section unique by
2639 adding at the end of it, in parentheses, the name of the original
2640 author or publisher of that section if known, or else a unique number.
2641 Make the same adjustment to the section titles in the list of
2642 Invariant Sections in the license notice of the combined work.
2645 In the combination, you must combine any sections entitled ``History''
2646 in the various original documents, forming one section entitled
2647 ``History''; likewise combine any sections entitled ``Acknowledgements'',
2648 and any sections entitled ``Dedications''. You must delete all sections
2649 entitled ``Endorsements.''
2653 <H2><A NAME=
"SECTION000117000000000000000">
2654 10.6 Collections of Documents
</A>
2658 You may make a collection consisting of the Document and other documents
2659 released under this License, and replace the individual copies of this
2660 License in the various documents with a single copy that is included in
2661 the collection, provided that you follow the rules of this License for
2662 verbatim copying of each of the documents in all other respects.
2665 You may extract a single document from such a collection, and distribute
2666 it individually under this License, provided you insert a copy of this
2667 License into the extracted document, and follow this License in all
2668 other respects regarding verbatim copying of that document.
2672 <H2><A NAME=
"SECTION000118000000000000000">
2673 10.7 Aggregation With Independent Works
</A>
2677 A compilation of the Document or its derivatives with other separate
2678 and independent documents or works, in or on a volume of a storage or
2679 distribution medium, does not as a whole count as a Modified Version
2680 of the Document, provided no compilation copyright is claimed for the
2681 compilation. Such a compilation is called an ``aggregate'', and this
2682 License does not apply to the other self-contained works thus compiled
2683 with the Document, on account of their being thus compiled, if they
2684 are not themselves derivative works of the Document.
2687 If the Cover Text requirement of section
3 is applicable to these
2688 copies of the Document, then if the Document is less than one quarter
2689 of the entire aggregate, the Document's Cover Texts may be placed on
2690 covers that surround only the Document within the aggregate.
2691 Otherwise they must appear on covers around the whole aggregate.
2695 <H2><A NAME=
"SECTION000119000000000000000">
2696 10.8 Translation
</A>
2700 Translation is considered a kind of modification, so you may
2701 distribute translations of the Document under the terms of section
4.
2702 Replacing Invariant Sections with translations requires special
2703 permission from their copyright holders, but you may include
2704 translations of some or all Invariant Sections in addition to the
2705 original versions of these Invariant Sections. You may include a
2706 translation of this License provided that you also include the
2707 original English version of this License. In case of a disagreement
2708 between the translation and the original English version of this
2709 License, the original English version will prevail.
2713 <H2><A NAME=
"SECTION0001110000000000000000">
2714 10.9 Termination
</A>
2718 You may not copy, modify, sublicense, or distribute the Document except
2719 as expressly provided for under this License. Any other attempt to
2720 copy, modify, sublicense or distribute the Document is void, and will
2721 automatically terminate your rights under this License. However,
2722 parties who have received copies, or rights, from you under this
2723 License will not have their licenses terminated so long as such
2724 parties remain in full compliance.
2728 <H2><A NAME=
"SECTION0001111000000000000000">
2729 10.10 Future Revisions of This License
</A>
2733 The Free Software Foundation may publish new, revised versions
2734 of the GNU Free Documentation License from time to time. Such new
2735 versions will be similar in spirit to the present version, but may
2736 differ in detail to address new problems or concerns. See
2737 http://www.gnu.org/copyleft/.
2740 Each version of the License is given a distinguishing version number.
2741 If the Document specifies that a particular numbered version of this
2742 License
"or any later version" applies to it, you have the option of
2743 following the terms and conditions either of that specified version or
2744 of any later version that has been published (not as a draft) by the
2745 Free Software Foundation. If the Document does not specify a version
2746 number of this License, you may choose any version ever published (not
2747 as a draft) by the Free Software Foundation.
2751 <H2><A NAME=
"SECTION0001112000000000000000">
2752 ADDENDUM: How to use this License for your documents
</A>
2756 To use this License in a document you have written, include a copy of
2757 the License in the document and put the following copyright and
2758 license notices just after the title page:
2762 <BLOCKQUOTE>Copyright
© YEAR YOUR NAME.
2763 Permission is granted to copy, distribute and/or modify this document
2764 under the terms of the GNU Free Documentation License, Version
1.1
2765 or any later version published by the Free Software Foundation;
2766 with the Invariant Sections being LIST THEIR TITLES, with the
2767 Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
2768 A copy of the license is included in the section entitled ``GNU
2769 Free Documentation License''.
2774 If you have no Invariant Sections, write ``with no Invariant Sections''
2775 instead of saying which ones are invariant. If you have no
2776 Front-Cover Texts, write ``no Front-Cover Texts'' instead of
2777 ``Front-Cover Texts being LIST''; likewise for Back-Cover Texts.
2780 If your document contains nontrivial examples of program code, we
2781 recommend releasing these examples in parallel under your choice of
2782 free software license, such as the GNU General Public License,
2783 to permit their use in free software.
2787 <H1><A NAME=
"SECTION000120000000000000000">
2788 About this document ...
</A>
2790 <STRONG>Specification of the Go Text Protocol, version
2, draft
2</STRONG><P>
2791 This document was generated using the
2792 <A HREF=
"http://www.latex2html.org/"><STRONG>LaTeX
</STRONG>2<tt>HTML
</tt></A> translator Version
2002 (
1.67)
2794 Copyright
© 1993,
1994,
1995,
1996,
2795 <A HREF=
"http://cbl.leeds.ac.uk/nikos/personal.html">Nikos Drakos
</A>,
2796 Computer Based Learning Unit, University of Leeds.
2798 Copyright
© 1997,
1998,
1999,
2799 <A HREF=
"http://www.maths.mq.edu.au/~ross/">Ross Moore
</A>,
2800 Mathematics Department, Macquarie University, Sydney.
2802 The command line arguments were:
<BR>
2803 <STRONG>latex2html
</STRONG> <TT>-split
0 -show_section_numbers -nonavigation gtp2-spec.tex
</TT>
2805 The translation was initiated by Gunnar Farneback on
2002-
10-
12